package com.ydj.app.entity.query;

import com.baomidou.mybatisplus.extension.service.IService;
import com.ydj.app.entity.Chat;
import com.ydj.framework.mysql.BaseQuery;
import com.ydj.framework.mysql.MysqlSort;

import java.util.Set;


public class ChatQuery extends BaseQuery<Chat> {
    public ChatQuery(IService<Chat> service) {
        super(service);
    }

    public ChatQuery id(Long id) {
        eq(Chat::getId, id);
        return this;
    }

    public ChatQuery ids(Set<Long> value) {
        in(Chat::getId, value);
        return this;
    }

    public ChatQuery userId(Long value) {
        eq(Chat::getUserId, value);
        return this;
    }

    public ChatQuery orderByUpdateTimeDesc() {
        orderBy(Chat::getUpdateTime, MysqlSort.DESC);
        return this;
    }
}